package org.xingyun.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.xingyun.bean.Areas;
import org.xingyun.dao.AreaDao;

import java.sql.SQLException;
import java.util.List;

public class AreaService {

    public String findAllArea(String cityid) throws SQLException, JsonProcessingException {
        List<Areas> list = new AreaDao().selectAll(cityid);
        String s = new ObjectMapper().writeValueAsString(list);
        return s;
    }
}
